home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Xm
/
XmCreateOptionMenu.z
/
XmCreateOptionMenu
Wrap
Text File
|
1998-10-30
|
10KB
|
199 lines
XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
NNNNAAAAMMMMEEEE
XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu - A RowColumn widget convenience creation
function
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
#include <Xm/RowColumn.h>
WWWWiiiiddddggggeeeetttt XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu(
WWWWiiiiddddggggeeeetttt ppppaaaarrrreeeennnntttt,
SSSSttttrrrriiiinnnngggg nnnnaaaammmmeeee,
AAAArrrrggggLLLLiiiisssstttt aaaarrrrgggglllliiiisssstttt,
CCCCaaaarrrrddddiiiinnnnaaaallll aaaarrrrggggccccoooouuuunnnntttt);
VVVVEEEERRRRSSSSIIIIOOOONNNN
This page documents Motif 2.1.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu creates an instance of a RowColumn widget
of type XXXXmmmmMMMMEEEENNNNUUUU____OOOOPPPPTTTTIIIIOOOONNNNand returns the associated widget ID.
It is provided as a convenience function for creating a
RowColumn widget configured to operate as an OptionMenu and
is not implemented as a separate widget class.
The OptionMenu widget is a specialized RowColumn manager
composed of a label, a selection area, and a single Pulldown
menu pane. When an application creates an OptionMenu widget,
it supplies the label string and the Pulldown menu pane. In
order for the operation to be successful, there must be a
valid XXXXmmmmNNNNssssuuuubbbbMMMMeeeennnnuuuuIIIIdddd resource set when this function is
called. The LabelGadget and the selection area (a
CascadeButtonGadget) are created by the OptionMenu.
The OptionMenu's Pulldown menu pane must not contain any
ToggleButtons or ToggleButtonGadgets. The results of
including CascadeButtons or CascadeButtonGadgets in the
OptionMenu's Pulldown menu pane are undefined.
An OptionMenu is laid out with the label displayed on one
side of the widget and the selection area on the other side
when XXXXmmmmNNNNoooorrrriiiieeeennnnttttaaaattttiiiioooonnnn is _X_m_H_O_R_I_Z_O_N_T_A_L. The layout of the
label with respect to the selection area depends on the
XXXXmmmmNNNNllllaaaayyyyoooouuuuttttDDDDiiiirrrreeeeccccttttiiiioooonnnn resource in the horizontal orientation.
If the value is XXXXmmmmVVVVEEEERRRRTTTTIIIICCCCAAAALLLL, the label is above the selection
area. The selection area has a dual purpose; it displays
the label of the last item selected from the associated
Pulldown menu pane, and it provides the means for posting
the Pulldown menu pane.
The OptionMenu typically does not display any 3-D visuals
around itself or the internal LabelGadget. By default, the
internal CascadeButtonGadget has a visible 3-D shadow. The
application may change this by getting the
Page 1 (printed 10/24/98)
XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
CascadeButtonGadget ID using XXXXmmmmOOOOppppttttiiiioooonnnnBBBBuuuuttttttttoooonnnnGGGGaaaaddddggggeeeetttt, and then
calling XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss using the standard visual-related
resources.
The Pulldown menu pane is posted when the mouse pointer is
moved over the selection area and a mouse button that is
defined by OptionMenu's RowColumn parent is pressed. The
Pulldown menu pane is posted and positioned so that the last
selected item is directly over the selection area. The mouse
is then used to arm the desired menu item. When the mouse
button is released, the armed menu item is selected and the
label within the selection area is changed to match that of
the selected item. By default, BBBBSSSSeeeelllleeeecccctttt is used to interact
with an OptionMenu. The default can be changed with the
RowColumn resource XXXXmmmmNNNNmmmmeeeennnnuuuuPPPPoooosssstttt.
The OptionMenu also operates with the keyboard interface
mechanism. If the application has established a mnemonic
with the OptionMenu, pressing <<<<AAAAlllltttt>>>> with the mnemonic causes
the Pulldown menu pane to be posted with traversal enabled.
The standard traversal keys can then be used to move within
the menu pane. Pressing <<<<RRRReeeettttuuuurrrrnnnn>>>> or typing a mnemonic or
accelerator for one of the menu items selects that item.
An application may use the XXXXmmmmNNNNmmmmeeeennnnuuuuHHHHiiiissssttttoooorrrryyyy resource to
indicate which item in the Pulldown menu pane should be
treated as the current choice and have its label displayed
in the selection area. By default, the first selectable item
in the Pulldown menu pane is used.
_p_a_r_e_n_t Specifies the parent widget ID
_n_a_m_e Specifies the name of the created widget
_a_r_g_l_i_s_t Specifies the argument list
_a_r_g_c_o_u_n_t Specifies the number of attribute/value pairs in
the argument list (_a_r_g_l_i_s_t)
The user can specify resources in a resource file for the
automatically created widgets and gadgets of an OptionMenu.
These widgets (or gadgets) and the associated OptionMenu
areas are
Option Menu Label Gadget
OOOOppppttttiiiioooonnnnLLLLaaaabbbbeeeellll
Option Menu Cascade Button
OOOOppppttttiiiioooonnnnBBBBuuuuttttttttoooonnnn
For a complete definition of RowColumn and its associated
resources, see XXXXmmmmRRRRoooowwwwCCCCoooolllluuuummmmnnnn(3).
Page 2 (printed 10/24/98)
XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCrrrreeeeaaaatttteeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
RRRREEEETTTTUUUURRRRNNNN
Returns the RowColumn widget ID.
RRRREEEELLLLAAAATTTTEEEEDDDD
XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnnGGGGaaaaddddggggeeeetttt(3), XXXXmmmmCCCCrrrreeeeaaaatttteeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu(3),
XXXXmmmmCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu(3), XXXXmmmmLLLLaaaabbbbeeeellllGGGGaaaaddddggggeeeetttt(3),
XXXXmmmmOOOOppppttttiiiioooonnnnBBBBuuuuttttttttoooonnnnGGGGaaaaddddggggeeeetttt(3), XXXXmmmmOOOOppppttttiiiioooonnnnLLLLaaaabbbbeeeellllGGGGaaaaddddggggeeeetttt(3),
XXXXmmmmRRRRoooowwwwCCCCoooolllluuuummmmnnnn(3), and XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu(3).
Page 3 (printed 10/24/98)